CC:=gcc

log:=thirdparty/log/log.h thirdparty/log/log.c
log_test: test/log_test.c $(log)
	-$(CC) $^ -o $@ -Ithirdparty
	-./$@
	-rm $@

app_common:=app/app_common.h app/app_common.c
app_common_test: test/app_common_test.c $(log) $(app_common)
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@

app_buffer:=app/app_buffer.h app/app_buffer.c
app_buffer_test: test/app_buffer_test.c $(log) $(app_buffer)
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@

json:=thirdparty/json/cJSON.h thirdparty/json/cJSON.c
cjson_test: test/cjson_test.c $(log) $(json)
	-$(CC) $^ -o $@ -Ithirdparty
	-./$@
	-rm $@

# gcc -Ixxx   为gcc指定include目录